using Merlba.MVVM.Module.Football.Models;
using NUnit.Framework;

namespace Merbla.MVVM.Tests
{
    [TestFixture]
    public class MatchResultTests
    {

        [Test]
        public void MatchResultShouldReturnCorrectTotalForAwayTeam()
        {
            var matchResult = new MatchResult
                                  {
                                      AwayTeam = new Team {TeamName = "Team A"},
                                      HomeTeam = new Team {TeamName = "Team B"},
                                      AwayTeamScore = new Score {Goals = 9, Behind = 7},
                                      HomeTeamScore = new Score {Goals = 14, Behind = 9}
                                  };
            Assert.AreEqual(61, matchResult.AwayTeamScore.ScoreTotal);
        }

        [Test]
        public void MatchResultShouldReturnCorrectTotalForHomeTeam()
        {
            var matchResult = new MatchResult
                                  {
                                      AwayTeam = new Team {TeamName = "Collingwood"},
                                      HomeTeam = new Team {TeamName = "Hawthorn"},
                                      AwayTeamScore = new Score {Goals = 9, Behind = 7},
                                      HomeTeamScore = new Score {Goals = 14, Behind = 9}
                                  };

            Assert.AreEqual(93, matchResult.HomeTeamScore.ScoreTotal);
        }

    }
}